my $my = <STDIN>;

sub regex_or {
  my $string = shift;
  $string =~ s/(?:^ +)||(?: +$)//g;
  return $string;
}

sub removeComment
{
  my $string = shift;
  $string =~ s/(?:^ +)||(?: +$)//g;
  @results = split("#",$string);
  return $results[0];

}
# main
my $t = removeComment($my);
print $t;